
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>新版猜歌 - 更多游戏</title>
    


    <link rel="shortcut icon" href="favicon.ico">
    <link href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/font-awesome/4.4.0/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/Admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/Public/Admin/css/style.min.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    
    
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>新版猜歌
                        <small>消息推送(请输入准确的信息)</small>
                    </h5>
                    
                </div>
                <div class="ibox-content">
                    <form method="post" class="form-horizontal">

                        <div class="form-group">
                            <label class="col-sm-2 control-label">测试用户id</label>

                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="uid" id="uid">
                            </div>

                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">模板id</label>

                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="tem" id="tem">
                            </div>

                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">字段一</label>

                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="keyword1" id="keyword1">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">字段二</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="keyword2" id="keyword2">
                                
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">字段三</label>

                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="keyword3" id="keyword3">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">字段四</label>

                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="keyword4" id="keyword4">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">字段五</label>

                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="keyword5" id="keyword5">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">加大字段</label>

                            <div class="col-sm-10">
                                <select class="form-control m-b" name="emphasis_keyword" id="emphasis_keyword">
                                    <option value="keyword1.DATA" >字段一</option>
                                    <option value="keyword2.DATA" >字段二</option>
                                    <option value="keyword3.DATA" >字段三</option>
                                    <option value="keyword4.DATA" >字段四</option>
                                    <option value="keyword5.DATA" >字段五</option>
                                </select>
                            </div>
                                
                        </div>
                        
                        <div class="hr-line-dashed"></div>
                       
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="button" onClick="save()">点击发送</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>


<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/Public/Admin/js/contabs.min.js?v=1.0"></script>
<script src="/Public/Admin/js/plugins/layer/layer.js?v=1.0"></script>
<script>
    
	var lock = 0;
	function save()
	{
		if(lock == 1){ return false;}
        layer.msg('发送中，请勿频繁操作', {icon: 1});
		var url = "{:U('GuessNewSong/send')}";
		$.ajax({
				type : 'post',
				url  : url+'?t='+Math.random(),
				data : $("form").serialize(),
				dataType : 'json',
				beforeSend: function(){
					lock = 1;
					layer.load(0, {shade: false}); //0代表加载的风格，支持0-2
				},
				success : function(res){
					layer.closeAll();
					if(res.state > 0){
					  layer.msg('发送成功', {icon: 1});
					  var t = window.setTimeout("reload()",2000); 
								
					}else{
						layer.msg(res.error, {icon: 2});
					}
				},
				complete: function(){
					lock = 0;
				},
				error : function(XMLHttpRequest, textStatus, errorThrown) {
					layer.closeAll();
					layer.msg('网络失败，请刷新页面后重试', {icon: 2});		
				}
		})		
	}
	
	
	function reload()
	{
		//document.location.reload();//当前页面 
		location.href = "{:U('GuessNewSong/send')}?";
	}
	
</script>

</body>

</html>
